<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>xgettext</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</HEAD>
<BODY>
<H1>xgettext</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
<B>XGETTEXT(1)</B>                           GNU                          <B>XGETTEXT(1)</B>




</PRE>
<H2>NAME</H2><PRE>
       xgettext - extract gettext strings from source


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>xgettext</B> [<I>OPTION</I>] [<I>INPUTFILE</I>]...


</PRE>
<H2>DESCRIPTION</H2><PRE>
       Extract translatable strings from given input files.

       Mandatory  arguments  to  long  options are mandatory for short options
       too.  Similarly for optional arguments.

   <B>Input</B> <B>file</B> <B>location:</B>
       INPUTFILE ...
              input files

       <B>-f</B>, <B>--files-from</B>=<I>FILE</I>
              get list of input files from FILE

       <B>-D</B>, <B>--directory</B>=<I>DIRECTORY</I>
              add DIRECTORY to list for input files search

       If input file is -, standard input is read.

   <B>Output</B> <B>file</B> <B>location:</B>
       <B>-d</B>, <B>--default-domain</B>=<I>NAME</I>
              use NAME.po for output (instead of messages.po)

       <B>-o</B>, <B>--output</B>=<I>FILE</I>
              write output to specified file

       <B>-p</B>, <B>--output-dir</B>=<I>DIR</I>
              output files will be placed in directory DIR

       If output file is -, output is written to standard output.

   <B>Choice</B> <B>of</B> <B>input</B> <B>file</B> <B>language:</B>
       <B>-L</B>, <B>--language</B>=<I>NAME</I>
              recognise the specified language (C, C++, ObjectiveC, PO, Shell,
              Python,   Lisp,  EmacsLisp,  librep,  Scheme,  Smalltalk,  Java,
              JavaProperties,  C#,  awk,  YCP,  Tcl,  Perl,  PHP,  GCC-source,
              NXStringTable, RST, Glade)

       <B>-C</B>, <B>--c</B>++
              shorthand for <B>--language</B>=<I>C</I>++

       By  default  the  language  is guessed depending on the input file name
       extension.

   <B>Input</B> <B>file</B> <B>interpretation:</B>
       <B>--from-code</B>=<I>NAME</I>
              encoding of input files (except for Python, Tcl, Glade)

       By default the input files are assumed to be in ASCII.

   <B>Operation</B> <B>mode:</B>
       <B>-j</B>, <B>--join-existing</B>
              join messages with existing file

       <B>-x</B>, <B>--exclude-file</B>=<I>FILE</I>.po
              entries from FILE.po are not extracted

       <B>-c</B>, <B>--add-comments</B>[=<I>TAG</I>]
              place comment block with TAG (or those preceding keyword  lines)
              in output file

   <B>Language</B> <B>specific</B> <B>options:</B>
       <B>-a</B>, <B>--extract-all</B>
              extract  all  strings (only languages C, C++, ObjectiveC, Shell,
              Python, Lisp, EmacsLisp, librep, Scheme,  Java,  C#,  awk,  Tcl,
              Perl, PHP, GCC-source, Glade)

       <B>-k</B>, <B>--keyword</B>[=<I>WORD</I>]
              additional  keyword  to be looked for (without WORD means not to
              use default keywords)

              (only languages C, C++, ObjectiveC, Shell, Python,  Lisp,  Emac-
              sLisp,  librep,  Scheme,  Java,  C#,  awk,  Tcl, Perl, PHP, GCC-
              source, Glade)

       <B>--flag</B>=<I>WORD</I>:ARG:FLAG
              additional flag for strings inside the argument  number  ARG  of
              keyword WORD

              (only  languages  C, C++, ObjectiveC, Shell, Python, Lisp, Emac-
              sLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP,  GCC-
              source)

       <B>-T</B>, <B>--trigraphs</B>
              understand  ANSI  C  trigraphs for input (only languages C, C++,
              ObjectiveC)

       <B>--qt</B>   recognize Qt format strings (only language C++)

       <B>--debug</B>
              more detailed formatstring recognition result

   <B>Output</B> <B>details:</B>
       <B>-e</B>, <B>--no-escape</B>
              do not use C escapes in output (default)

       <B>-E</B>, <B>--escape</B>
              use C escapes in output, no extended chars

       <B>--force-po</B>
              write PO file even if empty

       <B>-i</B>, <B>--indent</B>
              write the .po file using indented style

       <B>--no-location</B>
              do not write ’#: filename:line’ lines

       <B>-n</B>, <B>--add-location</B>
              generate ’#: filename:line’ lines (default)

       <B>--strict</B>
              write out strict Uniforum conforming .po file

       <B>--properties-output</B>
              write out a Java .properties file

       <B>--stringtable-output</B>
              write out a NeXTstep/GNUstep .strings file

       <B>-w</B>, <B>--width</B>=<I>NUMBER</I>
              set output page width

       <B>--no-wrap</B>
              do not break long message lines, longer  than  the  output  page
              width, into several lines

       <B>-s</B>, <B>--sort-output</B>
              generate sorted output

       <B>-F</B>, <B>--sort-by-file</B>
              sort output by file location

       <B>--omit-header</B>
              don’t write header with ‘msgid ""’ entry

       <B>--copyright-holder</B>=<I>STRING</I>
              set copyright holder in output

       <B>--foreign-user</B>
              omit FSF copyright in output for foreign user

       <B>--msgid-bugs-address</B>=<I>EMAIL</I>@ADDRESS
              set report address for msgid bugs

       <B>-m</B>, <B>--msgstr-prefix</B>[=<I>STRING</I>]
              use STRING or "" as prefix for msgstr entries

       <B>-M</B>, <B>--msgstr-suffix</B>[=<I>STRING</I>]
              use STRING or "" as suffix for msgstr entries

   <B>Informative</B> <B>output:</B>
       <B>-h</B>, <B>--help</B>
              display this help and exit

       <B>-V</B>, <B>--version</B>
              output version information and exit


</PRE>
<H2>AUTHOR</H2><PRE>
       Written by Ulrich Drepper.


</PRE>
<H2>REPORTING BUGS</H2><PRE>
       Report bugs to &lt;bug-gnu-gettext@gnu.org&gt;.


</PRE>
<H2>COPYRIGHT</H2><PRE>
       Copyright © 1995-1998, 2000-2005 Free Software Foundation, Inc.
       This is free software; see the source for copying conditions.  There is
       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
       PURPOSE.


</PRE>
<H2>SEE ALSO</H2><PRE>
       The  full documentation for <B>xgettext</B> is maintained as a Texinfo manual.
       If the <B>info</B> and <B>xgettext</B> programs are properly installed at your  site,
       the command

              <B>info</B> <B>xgettext</B>

       should give you access to the complete manual.



GNU gettext-tools 0.14.3          March 2005                       <B>XGETTEXT(1)</B>
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
